package org.lboot.rbac.controller;



import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.lboot.core.domain.ResponseDTO;
import org.lboot.starter.plugin.rsr.AuthRsrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kindear
 * 资源查询控制
 */
@RestController
@RequestMapping("system")
@Api(tags = "资源管理")
@AllArgsConstructor
public class ResController {

    AuthRsrService rsrService;


    // 资源选择树
    @GetMapping("res/tree")
    @ApiOperation(value = "资源树")
    public ResponseDTO<Object> resTree(){
        return ResponseDTO.succData(
                rsrService.rsrTree()
        );
    }
}
